package com.qk.management.service;

import com.qk.common.storage.FileStorageStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service
public class FileStorageFactory {

    private final Map<String, FileStorageStrategy> strategies;

    @Autowired
    public FileStorageFactory(Map<String, FileStorageStrategy> strategies) {
        this.strategies = strategies;
    }

    public FileStorageStrategy getStrategy(String type) {
        return strategies.get(type);
    }
}